<template>
 <div class="NavBar" :style="{background:bg}">
  <div class="left">
    <div>
       <span>&lt;</span>
       <span>{{backTex}}</span>
    </div>
  </div>
  <div class="center">{{centerTex}}</div>
  <div class="right" v-if="flag" @click="$emit('rightH')"><span>{{rightTex}}</span></div>
 </div>
</template>
<script>
export default{
    name:'',
    props:{
      bg:String,
      backTex:{
        type:String,
        default:'返回'//默认值
      },
      centerTex:{
        type:String,
        required:true//是否必填
      },
      rightTex:String,
      flag:Boolean
    },
    data () {
        return {
         
            
        }
    },
    created () {
    },
    computed:{
    },
    methods:{
    }
}
</script>
<style lang='less'  scoped>
.NavBar{
  display: flex;
  justify-content: space-between;
}
    
</style>
